<template>
    <div class="guanzhu" id="follow-us" ref="follow">
      <h2 style="margin-left: 25px" class="hometitle">关注我们 么么哒！</h2>
      <ul>
        <li class="sina"><a href="/" target="_blank"><span>{{followList[0].way}}</span>{{followList[0].data}}</a></li>
        <li class="qqGroup"><a href="//shang.qq.com/wpa/qunwpa?idkey=88bc57d77601a3c5ae97fe6d9c0bfa25c2ae166d8f0b9f6da6f7294097be6d08" target="_blank"><span>{{followList[1].way}}</span>{{followList[1].data}}</a></li>
        <li class="qq"><a href="tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=1595833114" target="_blank"><span>{{followList[2].way}}</span>{{followList[2].data}}</a></li>
        <li class="email"><a :href="mailto" target="_blank"><span>{{followList[3].way}}</span>{{followList[3].data}}</a></li>
        <li class="wxgzh"><a href="/" target="_blank"><span>{{followList[4].way}}</span>{{followList[4].data}}</a></li>
        <li class="github"><a :href="contact.github" target="_blank"><span>{{followList[5].way}}</span>{{followList[5].data}}</a></li>
        <li class="gitee"><a :href="contact.gitee" target="_blank"><span>{{followList[6].way}}</span>{{followList[6].data}}</a></li>
      </ul>
    </div>
</template>

<script>
import {mapMutations} from 'vuex'
export default {
  name: 'FollowUs',
  data () {
    return {
      contact: {},
      mailto: '',
      followList: [{
      	id: 0,
        way: "",
        data: ""
      }]
    }
  },
  created () {
    this.getFollowList()
  },
  methods: {
    getFollowList(){
			var vm = this
			vm.axios({
				method: 'GET',
				url: 'http://localhost/blog/follow/show'
			}).then(function (resp) {
				if (resp.status === 200) {
					vm.followList = resp.data
				} else {
					vm.$message({
						message: '更新关注我们失败!',
						type: 'error',
						center: true
					});
				}
			})
    }
  }
}
</script>

<style scoped src="../../assets/css/index.css">
</style>
